import React from 'react';
import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import Home from '../views/home'
import Detail from '../views/detail'
import Index1 from '../views/home/index/index.jsx'
import Classify from '../views/home/classify/index.jsx'
import Car from '../views/home/car/index.jsx'
import My from '../views/home/my/index.jsx'

const Index = () => {
	return (
		<BrowserRouter>
			<Routes>
				<Route path='/home' element={<Home></Home>}>
					<Route path='/home/index' element={<Index1></Index1>}></Route>
					<Route path='/home/classify' element={<Classify></Classify>}></Route>
					<Route path='/home/car' element={<Car></Car>}></Route>
					<Route path='/home/my' element={<My></My>}></Route>
				</Route>
				<Route path='/detail' element={<Detail></Detail>}></Route>
				<Route path='/' element={<Navigate to="/home/index"></Navigate>}></Route>
			</Routes>
		</BrowserRouter>
	);
}

export default Index;
